package com.ruoyi.yuwen.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yuwen.mapper.AccountMapper;
import com.ruoyi.yuwen.domain.Account;
import com.ruoyi.yuwen.service.IAccountService;

/**
 * 账号记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-27
 */
@Service
public class AccountServiceImpl implements IAccountService 
{
    @Autowired
    private AccountMapper accountMapper;

    /**
     * 查询账号记录
     * 
     * @param id 账号记录主键
     * @return 账号记录
     */
    @Override
    public Account selectAccountById(Long id)
    {
        return accountMapper.selectAccountById(id);
    }

    /**
     * 查询账号记录列表
     * 
     * @param account 账号记录
     * @return 账号记录
     */
    @Override
    public List<Account> selectAccountList(Account account)
    {
        return accountMapper.selectAccountList(account);
    }

    /**
     * 新增账号记录
     * 
     * @param account 账号记录
     * @return 结果
     */
    @Override
    public int insertAccount(Account account)
    {
        return accountMapper.insertAccount(account);
    }

    /**
     * 修改账号记录
     * 
     * @param account 账号记录
     * @return 结果
     */
    @Override
    public int updateAccount(Account account)
    {
        return accountMapper.updateAccount(account);
    }

    /**
     * 批量删除账号记录
     * 
     * @param ids 需要删除的账号记录主键
     * @return 结果
     */
    @Override
    public int deleteAccountByIds(Long[] ids)
    {
        return accountMapper.deleteAccountByIds(ids);
    }

    /**
     * 删除账号记录信息
     * 
     * @param id 账号记录主键
     * @return 结果
     */
    @Override
    public int deleteAccountById(Long id)
    {
        return accountMapper.deleteAccountById(id);
    }
}
